﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace UplopadQCloudDemo.Models
{

    public class ImgUrl
    {

        [JsonProperty("id")]
        public int Id { get; set; }

        [JsonProperty("url")]
        public string Url { get; set; }

        [JsonProperty("vheight")]
        public string Vheight { get; set; }

        [JsonProperty("vwidth")]
        public string Vwidth { get; set; }
    }

    public class VideoUrl
    {

        [JsonProperty("accessperm")]
        public int Accessperm { get; set; }

        [JsonProperty("definition")]
        public int Definition { get; set; }

        [JsonProperty("filename")]
        public string Filename { get; set; }

        [JsonProperty("md5")]
        public string Md5 { get; set; }

        [JsonProperty("sha")]
        public string Sha { get; set; }

        [JsonProperty("size")]
        public string Size { get; set; }

        [JsonProperty("update_time")]
        public string UpdateTime { get; set; }

        [JsonProperty("url")]
        public string Url { get; set; }

        [JsonProperty("vbitrate")]
        public int Vbitrate { get; set; }

        [JsonProperty("vheight")]
        public int Vheight { get; set; }

        [JsonProperty("vwidth")]
        public int Vwidth { get; set; }
    }

    public class ImageVideo
    {

        [JsonProperty("code")]
        public int Code { get; set; }

        [JsonProperty("duration")]
        public int Duration { get; set; }

        [JsonProperty("imgUrls")]
        public ImgUrl[] ImgUrls { get; set; }

        [JsonProperty("message")]
        public string Message { get; set; }

        [JsonProperty("vid")]
        public string Vid { get; set; }

        [JsonProperty("videoUrls")]
        public VideoUrl[] VideoUrls { get; set; }
    }

    public class PlayerCode
    {

        [JsonProperty("h5")]
        public string H5 { get; set; }

        [JsonProperty("flash")]
        public string Flash { get; set; }

        [JsonProperty("iframe")]
        public string Iframe { get; set; }
    }

    public class Data
    {

        [JsonProperty("image_video")]
        public ImageVideo ImageVideo { get; set; }

        [JsonProperty("ret")]
        public int Ret { get; set; }

        [JsonProperty("message")]
        public object Message { get; set; }

        [JsonProperty("file_id")]
        public string FileId { get; set; }

        [JsonProperty("player_code")]
        public PlayerCode PlayerCode { get; set; }
    }

    public class CallBackModel
    {
        [JsonProperty("data")]
        public Data Data { get; set; }

        [JsonProperty("status")]
        public int Status { get; set; }

        [JsonProperty("message")]
        public string Message { get; set; }

        [JsonProperty("task")]
        public string Task { get; set; }
    }
}
